package com.atguigu.eduorder.client;

import com.atguigu.commonutils.R;
import com.atguigu.commonutils.ordervo.CourseWebVoOrder;
import com.atguigu.commonutils.ordervo.UcenterMemberOrder;
import com.atguigu.eduorder.entity.EduChapter;
import com.atguigu.eduorder.entity.EduVideo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @Author: GengKY
 * @Date: 2021/9/25 10:01
 */
@Component
@FeignClient("service-edu")
public interface EduClient {

 /**
  * 课程购买量加一
  * @param courseID
  * @return
  */
 @PostMapping("/eduService/course/AddCourseBuy/{courseID}")
 public R AddCourseBuy(@PathVariable String courseID);

 /**
  * 根据课程ID查询课程信息，目的在于 service-order 中的远程调用
  */
 @PostMapping("/eduService/coursefront/getCourseInfoOrder/{id}")
 CourseWebVoOrder getCourseInfoOrder(@PathVariable("id") String id);


 @GetMapping("/eduService/video/getVideoByVideoName/{videoName}")
 public List<EduVideo> getVideoByVideoName(@PathVariable  String videoName);

 @GetMapping("/eduService/video/getVideoByVideoId/{videoId}")
 public List<EduVideo> getVideoByVideoId(@PathVariable String videoId);


 }
